package bhbt.service;


import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Service;

import bhbt.model.Admin;
import bhbt.service.core.BaseService;
import bhbt.utils.StringUtil;






@Service
public class AdminService extends BaseService {
	
	public Admin executAdmin(String loginName) {
		if(StringUtil.isNotBlank(loginName)) {
			Map<String, Object> param = new HashMap<String, Object>();
			param.put("loginName", loginName);
			List<Admin> admins = queryForList("select", param);
			if (null != admins && 0 < admins.size()) {
				return admins.get(0);
			}
		}
		return null;
	}

}
